<template>
	<view class="page">
		<view class="flex div-top" style="">
			<view class="flex top-left">
				<view class="top-name" style="">
					<open-data type="userNickName"></open-data>
				</view>
				<view style="font-size: 30rpx;">您已使用{{printCount}}次云打印</view>
			</view>
			<view class="head-img">
				<open-data type="userAvatarUrl"></open-data>
			</view>
			
		</view>
		<view style="margin-top:70rpx">
			<!-- <view class="flex list-item" v-for="item in list"> -->
			<!-- <text class="history" style="">{{item.name}}</text> -->
			<view class="flex list-item" >
				<u-button type="primary" class="reg-login" @click="historyPringting">
					<text class="history" style="">打印历史</text>
					<u-icon name="arrow-right" style="scroll-margin-right: 40rpx;"></u-icon>
				</u-button>
			</view>	
				
			<view class="flex list-item" >	
				<u-button type="" class="reg-login" @click="help">
					<text class="history" style="">帮助</text>
					<u-icon name="arrow-right" style="margin-right: 40rpx;"></u-icon>
				</u-button>
			</view>	
				
			<view class="flex list-item" >	
				<u-button type="primary" class="reg-login" >
					<text class="history" style="">反馈</text>
					<u-icon name="arrow-right" style="margin-right: 40rpx;"></u-icon>
				</u-button>
			</view>
		</view>
	</view>
</template>

<script>

export default{
	 components: {
	        
	    },
	data(){
		return{
			printCount:'0', //打印次数
			list:[
				{name:"打印历史"},
				{name:"帮助"},
				{name:"反馈"}
			]
		}
	},
	onShow: function() {
		 var that = this
		 that.$getPersonInfo().then((res)=>{
			 that.printCount = res.data.data.printCount
		 })
	
	},
	
	onLoad() {
		
	},
	
	methods:{
		//历史打印
		historyPringting(){
			uni.navigateTo({
				url: '../person/historyPrinting'
			})
		},
		
		//帮助
		help(){
			uni.navigateTo({
				url: '../person/help'
			})
		}
		
	}
}
</script>

<style lang="scss">
.head-img{
	width:120rpx;
	height: 120rpx;
	margin-right: 30rpx;
}
.div-top{
	justify-content: space-between;
	align-items: center;
	margin-top:20rpx;
}
.top-left{
	margin-left: 30rpx;
	flex-direction: column;
	align-content: space-between;
}
.top-name{
	font-size: 36rpx;
	font-weight: 600;
}
.list-item{
	justify-content: space-between;
	margin-top:30rpx;
	margin-bottom: 30rpx;
}
.history{
	font-size: 30rpx;
	margin-left: 40rpx;
}

.reg-login{
	width:700rpx;
	margin:5rpx auto;
}

</style>
